﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="showeleorder.aspx.cs" Inherits="Html5.showeleorder" %>

<%@ Register Src="~/baseControl.ascx" TagPrefix="uc1" TagName="baseControl" %>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <title><%= SectionProxyData.GetSetValue(3) %></title>
    <link type="text/css" rel="stylesheet" href="/css/style.css" />
    <link type="text/css" rel="stylesheet" href="/css/page.css" />
    <link href="/css/timeline.css" rel="stylesheet" />
    <link href="/css/sweetalert.css" rel="stylesheet" />
    <link href="../css/shopcenter.css" rel="stylesheet" />
    <script src="/javascript/jquery.js"></script>

    <style type="text/css">
        .shop_detail ul li {
            width: 50%;
        }

        .orderstep40 {
            border-color: red;
        }
    </style>

</head>


<body>



    <div class="page">
        <div id="page_title">
            <a href="eleorderlist.aspx" data-ajax="false" id="back" class=" top_left"></a>
            <h1>饿了么订单详情</h1>

        </div>




        <div class="container">



            <div class="" id="order_div2">

                <div class="my_order_list orderdetail" style="margin-top: 20px;">
                    <div class="tit">状态信息</div>
                </div>
                <ul class="my_order_list">
                    <li>

                        <asp:Repeater runat="server" ID="rptorder2">
                            <ItemTemplate>

                               


                                <div class="order-tit">
                                    <span class="time" data-icon="false">
                                        <strong>订单号：</strong>
                                        <label class="w_txt">
                                            <%# Eval("orderid") %><span id="order_<%# Eval("orderid") %>"><%# Convert.ToInt32(Eval("IsShopSet")) == 0 ? "" :"[已发]"  %></span>
                                        </label>

                                    </span>
                                </div>



                                <div class="view_back_con" id="divconfirm" style="<%# Convert.ToInt32(Eval("IsShopSet")) == 0? "": "display:none;"  %>">
                                    <input type="button" id="btsubmit" value="发送" onclick="sendEleOrder2system('<%# Eval("orderid") %>    ')" class="view_back_btn" data-ajax="false" />

                                </div>

                            </ItemTemplate>
                        </asp:Repeater>

                    </li>
                </ul>

                <div class="my_order_list orderdetail">
                    <div class="tit">订单明细</div>
                </div>
                <ul class="my_order_list">
                    <li>

                        <asp:Repeater runat="server" ID="rptfood">
                            <ItemTemplate>
                                <div class="order-tit">
                                    <span class="time" data-icon="false">
                                        <label><%# Eval("FoodName")%></label>
                                        <label class="w_txt">
                                            <%# Convert.ToDecimal(Eval("OldPrice"))%>元x<%# Eval("FCounts")%>
                                        </label>

                                    </span>
                                </div>
                            </ItemTemplate>
                        </asp:Repeater>

                        <asp:Repeater runat="server" ID="rptorder1">
                            <ItemTemplate>
                                <div class="order-tit">
                                    <div>
                                        <label class="w_txt" style="float: right; padding-right: 15px;">
                                            商品总额：￥<%# Convert.ToDecimal(Eval("OldPrice"))%>
                                        </label>

                                    </div>
                                </div>

                                <div class="order-tit">
                                    <div>
                                        <label class="w_txt" style="float: right; padding-right: 15px;">
                                            + 配送费：￥<%# Convert.ToDecimal(Eval("shopdiscountmoney"))%>
                                        </label>

                                    </div>
                                </div>
                            </ItemTemplate>
                        </asp:Repeater>

                    </li>
                </ul>

                <div class="my_order_list orderdetail">
                    <div class="tit">其他信息</div>
                </div>

                <ul class="my_order_list">
                    <li>

                        <asp:Repeater runat="server" ID="rptorder">
                            <ItemTemplate>

                                <div class="order-tit">
                                    <span class="time" data-icon="false">
                                        <strong>商家名称：</strong>
                                        <label class="w_txt">
                                            <%# Eval("togoname")%>
                                        </label>
                                    </span>
                                </div>
                                <div class="order-tit">
                                    <span class="time" data-icon="false">
                                        <strong>联系人：</strong>

                                        <label class="w_txt">
                                            <%# Eval("OrderRcver")%>
                                        </label>
                                    </span>
                                </div>
                                <div class="order-tit">
                                    <span class="time" data-icon="false">
                                        <strong>手机号码：</strong>
                                        <label class="w_txt">
                                            <%# Eval("OrderComm")%>
                                        </label>
                                    </span>
                                </div>
                                <div class="order-tit">
                                    <span class="time" data-icon="false">
                                        <strong>送达时间：</strong>

                                        <label class="w_txt">
                                            <%# Eval("SendTime")%>
                                        </label>
                                    </span>
                                </div>
                                <div class="order-tit">
                                    <span class="time" data-icon="false">
                                        <strong>送餐地址：</strong>


                                        <label class="w_txt">
                                            <%# Eval("AddressText")%>
                                        </label>
                                    </span>
                                </div>
                                <div class="order-tit" style="border-bottom: none;">
                                    <span class="time" data-icon="false">
                                        <strong>备注：</strong>

                                        <label class="w_txt">
                                            <%# Eval("OrderAttach")%>
                                        </label>
                                    </span>
                                </div>


                            </ItemTemplate>
                        </asp:Repeater>
                    </li>
                </ul>


            </div>

            <div id="divError" runat="server" class="error_list" style="color: #FF6000; margin-left: 15px;"></div>

        </div>
    </div>


    <uc1:baseControl runat="server" ID="baseControl" />

</body>
</html>
<script src="/javascript/jCommon.js"></script>
<script src="/javascript/sweetalert.min.js"></script>


<script type="text/javascript">







    ///发送饿了么订单到系统
    function sendEleOrder2system(orderid) {

        WeUI.showLoading();

        jQuery.ajax(
        {
            type: "get",
            url: "/ajaxHandler.ashx",
            data: 'method=sendEleOrder2system&orderid=' + orderid + "&t=" + new Date().getTime(),
            success: function (msg) {

                WeUI.hideLoadingslowly();

                var json = JSON.parse(msg);
                if (json.state == 1) {
                    WeUI.toastSuccess();
                    $("#order_" + orderid).html("[已发]");

                    $("#divconfirm").hide();
                }
                else {
                    sweetAlert("", json.msg, "warning");
                }


            }
        });
    }

</script>

